home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / FROMUTS / CDUNGEON / !CDUNGEON / c / OBJCTS < prev    next >
Text File  |  1991-05-20  |  24KB  |  1,141 lines

  1. /* OAPPLI- OBJECT SPECIAL ACTION ROUTINES */
  2.  
  3. /*COPYRIGHT 1980, INFOCOM COMPUTERS AND COMMUNICATIONS, CAMBRIDGE MA. 02142*/
  4. /* ALL RIGHTS RESERVED, COMMERCIAL USAGE STRICTLY PROHIBITED */
  5. /* WRITTEN BY R. M. SUPNIK */
  6.  
  7. #include "funcs.h"
  8. #include "vars.h"
  9.  
  10. logical oappli_(ri, arg)
  11. integer ri;
  12. integer arg;
  13. {
  14.     /* Initialized data */
  15.  
  16.     const integer mxsmp = 99;
  17.  
  18.     /* System generated locals */
  19.     integer i__1;
  20.     logical ret_val;
  21.  
  22.     /* Local variables */
  23.     logical f;
  24.     integer flobts, i;
  25.     integer j, av, io, ir, iz;
  26.     integer odi2 = 0, odo2 = 0;
  27.     integer nloc;
  28.  
  29.     if (ri == 0) {
  30.     goto L10;
  31.     }
  32. /*                         !ZERO IS FALSE APP. */
  33.     if (ri <= mxsmp) {
  34.     goto L100;
  35.     }
  36. /*                         !SIMPLE OBJECT? */
  37.     if (prsvec_1.prso > 220) {
  38.     goto L5;
  39.     }
  40.     if (prsvec_1.prso != 0) {
  41.     odo2 = objcts_1.odesc2[prsvec_1.prso - 1];
  42.     }
  43. L5:
  44.     if (prsvec_1.prsi != 0) {
  45.     odi2 = objcts_1.odesc2[prsvec_1.prsi - 1];
  46.     }
  47.     av = advs_1.avehic[play_1.winner - 1];
  48.     flobts = FLAMBT + LITEBT + ONBT;
  49.     ret_val = TRUE_;
  50.  
  51.     switch (ri - mxsmp) {
  52.     case 1:  goto L2000;
  53.     case 2:  goto L5000;
  54.     case 3:  goto L10000;
  55.     case 4:  goto L11000;
  56.     case 5:  goto L12000;
  57.     case 6:  goto L15000;
  58.     case 7:  goto L18000;
  59.     case 8:  goto L19000;
  60.     case 9:  goto L20000;
  61.     case 10:  goto L22000;
  62.     case 11:  goto L25000;
  63.     case 12:  goto L26000;
  64.     case 13:  goto L32000;
  65.     case 14:  goto L35000;
  66.     case 15:  goto L39000;
  67.     case 16:  goto L40000;
  68.     case 17:  goto L45000;
  69.     case 18:  goto L47000;
  70.     case 19:  goto L48000;
  71.     case 20:  goto L49000;
  72.     case 21:  goto L50000;
  73.     case 22:  goto L51000;
  74.     case 23:  goto L52000;
  75.     case 24:  goto L54000;
  76.     case 25:  goto L55000;
  77.     case 26:  goto L56000;
  78.     case 27:  goto L57000;
  79.     case 28:  goto L58000;
  80.     case 29:  goto L59000;
  81.     case 30:  goto L60000;
  82.     case 31:  goto L61000;
  83.     case 32:  goto L62000;
  84.     }
  85.     bug_(6, ri);
  86.  
  87. /* RETURN HERE TO DECLARE FALSE RESULT */
  88.  
  89. L10:
  90.     ret_val = FALSE_;
  91.     return ret_val;
  92.  
  93. /* SIMPLE OBJECTS, PROCESSED EXTERNALLY. */
  94.  
  95. L100:
  96.     if (ri < 32) {
  97.     ret_val = sobjs_(ri, arg);
  98.     }
  99.     else {
  100.     ret_val = nobjs_(ri, arg);
  101.     }
  102.     return ret_val;
  103. /* OAPPLI, PAGE 3 */
  104.  
  105. /* O100--    MACHINE FUNCTION */
  106.  
  107. L2000:
  108.     if (play_1.here != rindex_1.mmach) {
  109.     goto L10;
  110.     }
  111. /*                         !NOT HERE? F */
  112.     ret_val = opncls_(oindex_1.machi, 123, 124);
  113. /*                         !HANDLE OPN/CLS. */
  114.     return ret_val;
  115.  
  116. /* O101--    WATER FUNCTION */
  117.  
  118. L5000:
  119.     if (prsvec_1.prsa != vindex_1.fillw) {
  120.     goto L5050;
  121.     }
  122. /*                         !FILL X WITH Y IS */
  123.     prsvec_1.prsa = vindex_1.putw;
  124. /*                         !MADE INTO */
  125.     i = prsvec_1.prsi;
  126.     prsvec_1.prsi = prsvec_1.prso;
  127.     prsvec_1.prso = i;
  128. /*                         !PUT Y IN X. */
  129.     i = odi2;
  130.     odi2 = odo2;
  131.     odo2 = i;
  132. L5050:
  133.     if (prsvec_1.prso == oindex_1.water || prsvec_1.prso == oindex_1.gwate) {
  134.     goto L5100;
  135.     }
  136.     rspeak_(561);
  137. /*                         !WATER IS IND OBJ, */
  138.     return ret_val;
  139. /*                         !PUNT. */
  140.  
  141. L5100:
  142.     if (prsvec_1.prsa != vindex_1.takew) {
  143.     goto L5400;
  144.     }
  145. /*                         !TAKE WATER? */
  146.     if (objcts_1.oadv[oindex_1.bottl - 1] == play_1.winner && objcts_1.ocan[
  147.         prsvec_1.prso - 1] != oindex_1.bottl) {
  148.     goto L5500;
  149.     }
  150.     if (objcts_1.ocan[prsvec_1.prso - 1] == 0) {
  151.     goto L5200;
  152.     }
  153. /*                         !INSIDE ANYTHING? */
  154.     if ((objcts_1.oflag2[objcts_1.ocan[prsvec_1.prso - 1] - 1] & 
  155.         OPENBT) != 0) {
  156.     goto L5200;
  157.     }
  158. /*                         !YES, OPEN? */
  159.     rspsub_(525, objcts_1.odesc2[objcts_1.ocan[prsvec_1.prso - 1] - 1]);
  160. /*                         !INSIDE, CLOSED, PUNT. */
  161.     return ret_val;
  162.  
  163. L5200:
  164.     rspeak_(615);
  165. /*                         !NOT INSIDE OR OPEN, */
  166.     return ret_val;
  167. /*                         !SLIPS THRU FINGERS. */
  168.  
  169. L5400:
  170.     if (prsvec_1.prsa != vindex_1.putw) {
  171.     goto L5700;
  172.     }
  173. /*                         !PUT WATER IN X? */
  174.     if (av != 0 && prsvec_1.prsi == av) {
  175.     goto L5800;
  176.     }
  177. /*                         !IN VEH? */
  178.     if (prsvec_1.prsi == oindex_1.bottl) {
  179.     goto L5500;
  180.     }
  181. /*                         !IN BOTTLE? */
  182.     rspsub_(297, odi2);
  183. /*                         !WONT GO ELSEWHERE. */
  184.     newsta_(prsvec_1.prso, 0, 0, 0, 0);
  185. /*                         !VANISH WATER. */
  186.     return ret_val;
  187.  
  188. L5500:
  189.     if ((objcts_1.oflag2[oindex_1.bottl - 1] & OPENBT) != 0) {
  190.     goto L5550;
  191.     }
  192. /*                         !BOTTLE OPEN? */
  193.     rspeak_(612);
  194. /*                         !NO, LOSE. */
  195.     return ret_val;
  196.  
  197. L5550:
  198.     if (qempty_(oindex_1.bottl)) {
  199.     goto L5600;
  200.     }
  201. /*                         !OPEN, EMPTY? */
  202.     rspeak_(613);
  203. /*                         !NO, ALREADY FULL. */
  204.     return ret_val;
  205.  
  206. L5600:
  207.     newsta_(oindex_1.water, 614, 0, oindex_1.bottl, 0);
  208. /*                         !TAKE WATER TO BOTTLE. */
  209.     return ret_val;
  210.  
  211. L5700:
  212.     if (prsvec_1.prsa != vindex_1.dropw && prsvec_1.prsa != vindex_1.pourw && 
  213.         prsvec_1.prsa != vindex_1.givew) {
  214.     goto L5900;
  215.     }
  216.     if (av != 0) {
  217.     goto L5800;
  218.     }
  219. /*                         !INTO VEHICLE? */
  220.     newsta_(prsvec_1.prso, 133, 0, 0, 0);
  221. /*                         !NO, VANISHES. */
  222.     return ret_val;
  223.  
  224. L5800:
  225.     newsta_(oindex_1.water, 0, 0, av, 0);
  226. /*                         !WATER INTO VEHICLE. */
  227.     rspsub_(296, objcts_1.odesc2[av - 1]);
  228. /*                         !DESCRIBE. */
  229.     return ret_val;
  230.  
  231. L5900:
  232.     if (prsvec_1.prsa != vindex_1.throww) {
  233.     goto L10;
  234.     }
  235. /*                         !LAST CHANCE, THROW? */
  236.     newsta_(prsvec_1.prso, 132, 0, 0, 0);
  237. /*                         !VANISHES. */
  238.     return ret_val;
  239. /* OAPPLI, PAGE 4 */
  240.  
  241. /* O102--    LEAF PILE */
  242.  
  243. L10000:
  244.     if (prsvec_1.prsa != vindex_1.burnw) {
  245.     goto L10500;
  246.     }
  247. /*                         !BURN? */
  248.     if (objcts_1.oroom[prsvec_1.prso - 1] == 0) {
  249.     goto L10100;
  250.     }
  251. /*                         !WAS HE CARRYING? */
  252.     newsta_(prsvec_1.prso, 158, 0, 0, 0);
  253. /*                         !NO, BURN IT. */
  254.     return ret_val;
  255.  
  256. L10100:
  257.     newsta_(prsvec_1.prso, 0, play_1.here, 0, 0);
  258. /*                         !DROP LEAVES. */
  259.     jigsup_(159);
  260. /*                         !BURN HIM. */
  261.     return ret_val;
  262.  
  263. L10500:
  264.     if (prsvec_1.prsa != vindex_1.movew) {
  265.     goto L10600;
  266.     }
  267. /*                         !MOVE? */
  268.     rspeak_(2);
  269. /*                         !DONE. */
  270.     return ret_val;
  271.  
  272. L10600:
  273.     if (prsvec_1.prsa != vindex_1.lookuw || findex_1.rvclr != 0) {
  274.     goto L10;
  275.     }
  276.     rspeak_(344);
  277. /*                         !LOOK UNDER? */
  278.     return ret_val;
  279.  
  280. /* O103--    TROLL, DONE EXTERNALLY. */
  281.  
  282. L11000:
  283.     ret_val = trollp_(arg);
  284. /*                         !TROLL PROCESSOR. */
  285.     return ret_val;
  286.  
  287. /* O104--    RUSTY KNIFE. */
  288.  
  289. L12000:
  290.     if (prsvec_1.prsa != vindex_1.takew) {
  291.     goto L12100;
  292.     }
  293. /*                         !TAKE? */
  294.     if (objcts_1.oadv[oindex_1.sword - 1] == play_1.winner) {
  295.     rspeak_(160);
  296.     }
  297. /*                         !PULSE SWORD. */
  298.     goto L10;
  299.  
  300. L12100:
  301.     if ((prsvec_1.prsa != vindex_1.attacw && prsvec_1.prsa != vindex_1.killw 
  302.         || prsvec_1.prsi != oindex_1.rknif) && (prsvec_1.prsa != 
  303.         vindex_1.swingw && prsvec_1.prsa != vindex_1.throww || 
  304.         prsvec_1.prso != oindex_1.rknif)) {
  305.     goto L10;
  306.     }
  307.     newsta_(oindex_1.rknif, 0, 0, 0, 0);
  308. /*                         !KILL KNIFE. */
  309.     jigsup_(161);
  310. /*                         !KILL HIM. */
  311.     return ret_val;
  312. /* OAPPLI, PAGE 5 */
  313.  
  314. /* O105--    GLACIER */
  315.  
  316. L15000:
  317.     if (prsvec_1.prsa != vindex_1.throww) {
  318.     goto L15500;
  319.     }
  320. /*                         !THROW? */
  321.     if (prsvec_1.prso != oindex_1.torch) {
  322.     goto L15400;
  323.     }
  324. /*                         !TORCH? */
  325.     newsta_(oindex_1.ice, 169, 0, 0, 0);
  326. /*                         !MELT ICE. */
  327.     objcts_1.odesc1[oindex_1.torch - 1] = 174;
  328. /*                         !MUNG TORCH. */
  329.     objcts_1.odesc2[oindex_1.torch - 1] = 173;
  330.     objcts_1.oflag1[oindex_1.torch - 1] &= ~ flobts;
  331.     newsta_(oindex_1.torch, 0, rindex_1.strea, 0, 0);
  332. /*                         !MOVE TORCH. */
  333.     findex_1.glacrf = TRUE_;
  334. /*                         !GLACIER GONE. */
  335.     if (! lit_(play_1.here)) {
  336.     rspeak_(170);
  337.     }
  338. /*                         !IN DARK? */
  339.     return ret_val;
  340.  
  341. L15400:
  342.     rspeak_(171);
  343. /*                         !JOKE IF NOT TORCH. */
  344.     return ret_val;
  345.  
  346. L15500:
  347.     if (prsvec_1.prsa != vindex_1.meltw || prsvec_1.prso != oindex_1.ice) {
  348.     goto L10;
  349.     }
  350.     if ((objcts_1.oflag1[prsvec_1.prsi - 1] & flobts) == flobts) {
  351.     goto L15600;
  352.     }
  353.     rspsub_(298, odi2);
  354. /*                         !CANT MELT WITH THAT. */
  355.     return ret_val;
  356.  
  357. L15600:
  358.     findex_1.glacmf = TRUE_;
  359. /*                         !PARTIAL MELT. */
  360.     if (prsvec_1.prsi != oindex_1.torch) {
  361.     goto L15700;
  362.     }
  363. /*                         !MELT WITH TORCH? */
  364.     objcts_1.odesc1[oindex_1.torch - 1] = 174;
  365. /*                         !MUNG TORCH. */
  366.     objcts_1.odesc2[oindex_1.torch - 1] = 173;
  367.     objcts_1.oflag1[oindex_1.torch - 1] &= ~ flobts;
  368. L15700:
  369.     jigsup_(172);
  370. /*                         !DROWN. */
  371.     return ret_val;
  372.  
  373. /* O106--    BLACK BOOK */
  374.  
  375. L18000:
  376.     if (prsvec_1.prsa != vindex_1.openw) {
  377.     goto L18100;
  378.     }
  379. /*                         !OPEN? */
  380.     rspeak_(180);
  381. /*                         !JOKE. */
  382.     return ret_val;
  383.  
  384. L18100:
  385.     if (prsvec_1.prsa != vindex_1.closew) {
  386.     goto L18200;
  387.     }
  388. /*                         !CLOSE? */
  389.     rspeak_(181);
  390.     return ret_val;
  391.  
  392. L18200:
  393.     if (prsvec_1.prsa != vindex_1.burnw) {
  394.     goto L10;
  395.     }
  396. /*                         !BURN? */
  397.     newsta_(prsvec_1.prso, 0, 0, 0, 0);
  398. /*                         !FATAL JOKE. */
  399.     jigsup_(182);
  400.     return ret_val;
  401. /* OAPPLI, PAGE 6 */
  402.  
  403. /* O107--    CANDLES, PROCESSED EXTERNALLY */
  404.  
  405. L19000:
  406.     ret_val = lightp_(oindex_1.candl);
  407.     return ret_val;
  408.  
  409. /* O108--    MATCHES, PROCESSED EXTERNALLY */
  410.  
  411. L20000:
  412.     ret_val = lightp_(oindex_1.match);
  413.     return ret_val;
  414.  
  415. /* O109--    CYCLOPS, PROCESSED EXTERNALLY. */
  416.  
  417. L22000:
  418.     ret_val = cyclop_(arg);
  419. /*                         !CYCLOPS */
  420.     return ret_val;
  421.  
  422. /* O110--    THIEF, PROCESSED EXTERNALLY */
  423.  
  424. L25000:
  425.     ret_val = thiefp_(arg);
  426.     return ret_val;
  427.  
  428. /* O111--    WINDOW */
  429.  
  430. L26000:
  431.     ret_val = opncls_(oindex_1.windo, 208, 209);
  432. /*                         !OPEN/CLS WINDOW. */
  433.     return ret_val;
  434.  
  435. /* O112--    PILE OF BODIES */
  436.  
  437. L32000:
  438.     if (prsvec_1.prsa != vindex_1.takew) {
  439.     goto L32500;
  440.     }
  441. /*                         !TAKE? */
  442.     rspeak_(228);
  443. /*                         !CANT. */
  444.     return ret_val;
  445.  
  446. L32500:
  447.     if (prsvec_1.prsa != vindex_1.burnw && prsvec_1.prsa != vindex_1.mungw) {
  448.     goto L10;
  449.     }
  450.     if (findex_1.onpolf) {
  451.     return ret_val;
  452.     }
  453. /*                         !BURN OR MUNG? */
  454.     findex_1.onpolf = TRUE_;
  455. /*                         !SET HEAD ON POLE. */
  456.     newsta_(oindex_1.hpole, 0, rindex_1.lld2, 0, 0);
  457.     jigsup_(229);
  458. /*                         !BEHEADED. */
  459.     return ret_val;
  460.  
  461. /* O113--    VAMPIRE BAT */
  462.  
  463. L35000:
  464.     rspeak_(50);
  465. /*                         !TIME TO FLY, JACK. */
  466.     f = moveto_(bats_1.batdrp[rnd_(9)], play_1.winner);
  467. /*                         !SELECT RANDOM DEST. */
  468.     f = rmdesc_(0);
  469.     return ret_val;
  470. /* OAPPLI, PAGE 7 */
  471.  
  472. /* O114--    STICK */
  473.  
  474. L39000:
  475.     if (prsvec_1.prsa != vindex_1.wavew) {
  476.     goto L10;
  477.     }
  478. /*                         !WAVE? */
  479.     if (play_1.here == rindex_1.mrain) {
  480.     goto L39500;
  481.     }
  482. /*                         !ON RAINBOW? */
  483.     if (play_1.here == rindex_1.pog || play_1.here == rindex_1.falls) {
  484.     goto L39200;
  485.     }
  486.     rspeak_(244);
  487. /*                         !NOTHING HAPPENS. */
  488.     return ret_val;
  489.  
  490. L39200:
  491.     objcts_1.oflag1[oindex_1.pot - 1] |= VISIBT;
  492.     findex_1.rainbf = ! findex_1.rainbf;
  493. /*                         !COMPLEMENT RAINBOW. */
  494.     i = 245;
  495. /*                         !ASSUME OFF. */
  496.     if (findex_1.rainbf) {
  497.     i = 246;
  498.     }
  499. /*                         !IF ON, SOLID. */
  500.     rspeak_(i);
  501. /*                         !DESCRIBE. */
  502.     return ret_val;
  503.  
  504. L39500:
  505.     findex_1.rainbf = FALSE_;
  506. /*                         !ON RAINBOW, */
  507.     jigsup_(247);
  508. /*                         !TAKE A FALL. */
  509.     return ret_val;
  510.  
  511. /* O115--    BALLOON, HANDLED EXTERNALLY */
  512.  
  513. L40000:
  514.     ret_val = ballop_(arg);
  515.     return ret_val;
  516.  
  517. /* O116--    HEADS */
  518.  
  519. L45000:
  520.     if (prsvec_1.prsa != vindex_1.hellow) {
  521.     goto L45100;
  522.     }
  523. /*                         !HELLO HEADS? */
  524.     rspeak_(633);
  525. /*                         !TRULY BIZARRE. */
  526.     return ret_val;
  527.  
  528. L45100:
  529.     if (prsvec_1.prsa == vindex_1.readw) {
  530.     goto L10;
  531.     }
  532. /*                         !READ IS OK. */
  533.     newsta_(oindex_1.lcase, 260, rindex_1.lroom, 0, 0);
  534. /*                         !MAKE LARGE CASE. */
  535.     i = robadv_(play_1.winner, 0, oindex_1.lcase, 0) + robrm_(
  536.         play_1.here, 100, 0, oindex_1.lcase, 0);
  537.     jigsup_(261);
  538. /*                         !KILL HIM. */
  539.     return ret_val;
  540. /* OAPPLI, PAGE 8 */
  541.  
  542. /* O117--    SPHERE */
  543.  
  544. L47000:
  545.     if (findex_1.cagesf || prsvec_1.prsa != vindex_1.takew) {
  546.     goto L10;
  547.     }
  548. /*                         !TAKE? */
  549.     if (play_1.winner != aindex_1.player) {
  550.     goto L47500;
  551.     }
  552. /*                         !ROBOT TAKE? */
  553.     rspeak_(263);
  554. /*                         !NO, DROP CAGE. */
  555.     if (objcts_1.oroom[oindex_1.robot - 1] != play_1.here) {
  556.     goto L47200;
  557.     }
  558. /*                         !ROBOT HERE? */
  559.     f = moveto_(rindex_1.caged, play_1.winner);
  560. /*                         !YES, MOVE INTO CAGE. */
  561.     newsta_(oindex_1.robot, 0, rindex_1.caged, 0, 0);
  562. /*                         !MOVE ROBOT. */
  563.     advs_1.aroom[aindex_1.arobot - 1] = rindex_1.caged;
  564.     objcts_1.oflag1[oindex_1.robot - 1] |= NDSCBT;
  565.     cevent_1.ctick[cindex_1.cevsph - 1] = 10;
  566. /*                         !GET OUT IN 10 OR ELSE. */
  567.     return ret_val;
  568.  
  569. L47200:
  570.     newsta_(oindex_1.spher, 0, 0, 0, 0);
  571. /*                         !YOURE DEAD. */
  572.     rooms_1.rflag[rindex_1.cager - 1] |= RMUNG;
  573.     rrand[rindex_1.cager - 1] = 147;
  574.     jigsup_(148);
  575. /*                         !MUNG PLAYER. */
  576.     return ret_val;
  577.  
  578. L47500:
  579.     newsta_(oindex_1.spher, 0, 0, 0, 0);
  580. /*                         !ROBOT TRIED, */
  581.     newsta_(oindex_1.robot, 264, 0, 0, 0);
  582. /*                         !KILL HIM. */
  583.     newsta_(oindex_1.cage, 0, play_1.here, 0, 0);
  584. /*                         !INSERT MANGLED CAGE. */
  585.     return ret_val;
  586.  
  587. /* O118--    GEOMETRICAL BUTTONS */
  588.  
  589. L48000:
  590.     if (prsvec_1.prsa != vindex_1.pushw) {
  591.     goto L10;
  592.     }
  593. /*                         !PUSH? */
  594.     i = prsvec_1.prso - oindex_1.sqbut + 1;
  595. /*                         !GET BUTTON INDEX. */
  596.     if (i <= 0 || i >= 4) {
  597.     goto L10;
  598.     }
  599. /*                         !A BUTTON? */
  600.     if (play_1.winner != aindex_1.player) {
  601.     switch (i) {
  602.         case 1:  goto L48100;
  603.         case 2:  goto L48200;
  604.         case 3:  goto L48300;
  605.     }
  606.     }
  607.     jigsup_(265);
  608. /*                         !YOU PUSHED, YOU DIE. */
  609.     return ret_val;
  610.  
  611. L48100:
  612.     i = 267;
  613.     if (findex_1.carozf) {
  614.     i = 266;
  615.     }
  616. /*                         !SPEED UP? */
  617.     findex_1.carozf = TRUE_;
  618.     rspeak_(i);
  619.     return ret_val;
  620.  
  621. L48200:
  622.     i = 266;
  623. /*                         !ASSUME NO CHANGE. */
  624.     if (findex_1.carozf) {
  625.     i = 268;
  626.     }
  627.     findex_1.carozf = FALSE_;
  628.     rspeak_(i);
  629.     return ret_val;
  630.  
  631. L48300:
  632.     findex_1.caroff = ! findex_1.caroff;
  633. /*                         !FLIP CAROUSEL. */
  634.     if (! qhere_(oindex_1.irbox, rindex_1.carou)) {
  635.     return ret_val;
  636.     }
  637. /*                         !IRON BOX IN CAROUSEL? */
  638.     rspeak_(269);
  639. /*                         !YES, THUMP. */
  640.     objcts_1.oflag1[oindex_1.irbox - 1] ^= VISIBT;
  641.     if (findex_1.caroff) {
  642.     rooms_1.rflag[rindex_1.carou - 1] &= ~ RSEEN;
  643.     }
  644.     return ret_val;
  645.  
  646. /* O119--    FLASK FUNCTION */
  647.  
  648. L49000:
  649.     if (prsvec_1.prsa == vindex_1.openw) {
  650.     goto L49100;
  651.     }
  652. /*                         !OPEN? */
  653.     if (prsvec_1.prsa != vindex_1.mungw && prsvec_1.prsa != vindex_1.throww) {
  654.  
  655.     goto L10;
  656.     }
  657.     newsta_(oindex_1.flask, 270, 0, 0, 0);
  658. /*                         !KILL FLASK. */
  659. L49100:
  660.     rooms_1.rflag[play_1.here - 1] |= RMUNG;
  661.     rrand[play_1.here - 1] = 271;
  662.     jigsup_(272);
  663. /*                         !POISONED. */
  664.     return ret_val;
  665.  
  666. /* O120--    BUCKET FUNCTION */
  667.  
  668. L50000:
  669.     if (arg != 2) {
  670.     goto L10;
  671.     }
  672. /*                         !READOUT? */
  673.     if (objcts_1.ocan[oindex_1.water - 1] != oindex_1.bucke || 
  674.         findex_1.bucktf) {
  675.     goto L50500;
  676.     }
  677.     findex_1.bucktf = TRUE_;
  678. /*                         !BUCKET AT TOP. */
  679.     cevent_1.ctick[cindex_1.cevbuc - 1] = 100;
  680. /*                         !START COUNTDOWN. */
  681.     newsta_(oindex_1.bucke, 290, rindex_1.twell, 0, 0);
  682. /*                         !REPOSITION BUCKET. */
  683.     goto L50900;
  684. /*                         !FINISH UP. */
  685.  
  686. L50500:
  687.     if (objcts_1.ocan[oindex_1.water - 1] == oindex_1.bucke || ! 
  688.         findex_1.bucktf) {
  689.     goto L10;
  690.     }
  691.     findex_1.bucktf = FALSE_;
  692.     newsta_(oindex_1.bucke, 291, rindex_1.bwell, 0, 0);
  693. /*                         !BUCKET AT BOTTOM. */
  694. L50900:
  695.     if (av != oindex_1.bucke) {
  696.     return ret_val;
  697.     }
  698. /*                         !IN BUCKET? */
  699.     f = moveto_(objcts_1.oroom[oindex_1.bucke - 1], play_1.winner);
  700. /*                         !MOVE ADVENTURER. */
  701.     f = rmdesc_(0);
  702. /*                         !DESCRIBE ROOM. */
  703.     return ret_val;
  704. /* OAPPLI, PAGE 9 */
  705.  
  706. /* O121--    EATME CAKE */
  707.  
  708. L51000:
  709.     if (prsvec_1.prsa != vindex_1.eatw || prsvec_1.prso != oindex_1.ecake || 
  710.         play_1.here != rindex_1.alice) {
  711.     goto L10;
  712.     }
  713.     newsta_(oindex_1.ecake, 273, 0, 0, 0);
  714. /*                         !VANISH CAKE. */
  715.     objcts_1.oflag1[oindex_1.robot - 1] &= ~ VISIBT;
  716.     ret_val = moveto_(rindex_1.alism, play_1.winner);
  717. /*                         !MOVE TO ALICE SMALL. */
  718.     iz = 64;
  719.     ir = rindex_1.alism;
  720.     io = rindex_1.alice;
  721.     goto L52405;
  722.  
  723. /* O122--    ICINGS */
  724.  
  725. L52000:
  726.     if (prsvec_1.prsa != vindex_1.readw) {
  727.     goto L52200;
  728.     }
  729. /*                         !READ? */
  730.     i = 274;
  731. /*                         !CANT READ. */
  732.     if (prsvec_1.prsi != 0) {
  733.     i = 275;
  734.     }
  735. /*                         !THROUGH SOMETHING? */
  736.     if (prsvec_1.prsi == oindex_1.bottl) {
  737.     i = 276;
  738.     }
  739. /*                         !THROUGH BOTTLE? */
  740.     if (prsvec_1.prsi == oindex_1.flask) {
  741.     i = prsvec_1.prso - oindex_1.orice + 277;
  742.     }
  743. /*                         !THROUGH FLASK? */
  744.     rspeak_(i);
  745. /*                         !READ FLASK. */
  746.     return ret_val;
  747.  
  748. L52200:
  749.     if (prsvec_1.prsa != vindex_1.throww || prsvec_1.prso != oindex_1.rdice ||
  750.          prsvec_1.prsi != oindex_1.pool) {
  751.     goto L52300;
  752.     }
  753.     newsta_(oindex_1.pool, 280, 0, 0, 0);
  754. /*                         !VANISH POOL. */
  755.     objcts_1.oflag1[oindex_1.saffr - 1] |= VISIBT;
  756.     return ret_val;
  757.  
  758. L52300:
  759.     if (play_1.here != rindex_1.alice && play_1.here != rindex_1.alism && 
  760.         play_1.here != rindex_1.alitr) {
  761.     goto L10;
  762.     }
  763.     if (prsvec_1.prsa != vindex_1.eatw && prsvec_1.prsa != vindex_1.throww || 
  764.         prsvec_1.prso != oindex_1.orice) {
  765.     goto L52400;
  766.     }
  767.     newsta_(oindex_1.orice, 0, 0, 0, 0);
  768. /*                         !VANISH ORANGE ICE. */
  769.     rooms_1.rflag[play_1.here - 1] |= RMUNG;
  770.     rrand[play_1.here - 1] = 281;
  771.     jigsup_(282);
  772. /*                         !VANISH ADVENTURER. */
  773.     return ret_val;
  774.  
  775. L52400:
  776.     if (prsvec_1.prsa != vindex_1.eatw || prsvec_1.prso != oindex_1.blice) {
  777.     goto L10;
  778.     }
  779.     newsta_(oindex_1.blice, 283, 0, 0, 0);
  780. /*                         !VANISH BLUE ICE. */
  781.     if (play_1.here != rindex_1.alism) {
  782.     goto L52500;
  783.     }
  784. /*                         !IN REDUCED ROOM? */
  785.     objcts_1.oflag1[oindex_1.robot - 1] |= VISIBT;
  786.     io = play_1.here;
  787.     ret_val = moveto_(rindex_1.alice, play_1.winner);
  788.     iz = 0;
  789.     ir = rindex_1.alice;
  790.  
  791. /*  Do a size change, common loop used also by code at 51000 */
  792.  
  793. L52405:
  794.     i__1 = objcts_1.olnt;
  795.     for (i = 1; i <= i__1; ++i) {
  796. /*                         !ENLARGE WORLD. */
  797.     if (objcts_1.oroom[i - 1] != io || objcts_1.osize[i - 1] == 10000) {
  798.         goto L52450;
  799.     }
  800.     objcts_1.oroom[i - 1] = ir;
  801.     objcts_1.osize[i - 1] *= iz;
  802. L52450:
  803.     ;
  804.     }
  805.     return ret_val;
  806.  
  807. L52500:
  808.     jigsup_(284);
  809. /*                         !ENLARGED IN WRONG ROOM. */
  810.     return ret_val;
  811.  
  812. /* O123--    BRICK */
  813.  
  814. L54000:
  815.     if (prsvec_1.prsa != vindex_1.burnw) {
  816.     goto L10;
  817.     }
  818. /*                         !BURN? */
  819.     jigsup_(150);
  820. /*                         !BOOM */
  821. /*                         ! */
  822.     return ret_val;
  823.  
  824. /* O124--    MYSELF */
  825.  
  826. L55000:
  827.     if (prsvec_1.prsa != vindex_1.givew) {
  828.     goto L55100;
  829.     }
  830. /*                         !GIVE? */
  831.     newsta_(prsvec_1.prso, 2, 0, 0, aindex_1.player);
  832. /*                         !DONE. */
  833.     return ret_val;
  834.  
  835. L55100:
  836.     if (prsvec_1.prsa != vindex_1.takew) {
  837.     goto L55200;
  838.     }
  839. /*                         !TAKE? */
  840.     rspeak_(286);
  841. /*                         !JOKE. */
  842.     return ret_val;
  843.  
  844. L55200:
  845.     if (prsvec_1.prsa != vindex_1.killw && prsvec_1.prsa != vindex_1.mungw) {
  846.     goto L10;
  847.     }
  848.     jigsup_(287);
  849. /*                         !KILL, NO JOKE. */
  850.     return ret_val;
  851. /* OAPPLI, PAGE 10 */
  852.  
  853. /* O125--    PANELS INSIDE MIRROR */
  854.  
  855. L56000:
  856.     if (prsvec_1.prsa != vindex_1.pushw) {
  857.     goto L10;
  858.     }
  859. /*                         !PUSH? */
  860.     if (findex_1.poleuf != 0) {
  861.     goto L56100;
  862.     }
  863. /*                         !SHORT POLE UP? */
  864.     i = 731;
  865. /*                         !NO, WONT BUDGE. */
  866.     if (findex_1.mdir % 180 == 0) {
  867.     i = 732;
  868.     }
  869. /*                         !DIFF MSG IF N-S. */
  870.     rspeak_(i);
  871. /*                         !TELL WONT MOVE. */
  872.     return ret_val;
  873.  
  874. L56100:
  875.     if (findex_1.mloc != rindex_1.mrg) {
  876.     goto L56200;
  877.     }
  878. /*                         !IN GDN ROOM? */
  879.     rspeak_(733);
  880. /*                         !YOU LOSE. */
  881.     jigsup_(685);
  882.     return ret_val;
  883.  
  884. L56200:
  885.     i = 831;
  886. /*                         !ROTATE L OR R. */
  887.     if (prsvec_1.prso == oindex_1.rdwal || prsvec_1.prso == oindex_1.ylwal) {
  888.     i = 830;
  889.     }
  890.     rspeak_(i);
  891. /*                         !TELL DIRECTION. */
  892.     findex_1.mdir = (findex_1.mdir + 45 + (i - 830) * 270) % 360;
  893. /*                         !CALCULATE NEW DIR. */
  894.     i__1 = findex_1.mdir / 45 + 695;
  895.     rspsub_(734, i__1);
  896. /*                         !TELL NEW DIR. */
  897.     if (findex_1.wdopnf) {
  898.     rspeak_(730);
  899.     }
  900. /*                         !IF PANEL OPEN, CLOSE. */
  901.     findex_1.wdopnf = FALSE_;
  902.     return ret_val;
  903. /*                         !DONE. */
  904.  
  905. /* O126--    ENDS INSIDE MIRROR */
  906.  
  907. L57000:
  908.     if (prsvec_1.prsa != vindex_1.pushw) {
  909.     goto L10;
  910.     }
  911. /*                         !PUSH? */
  912.     if (findex_1.mdir % 180 == 0) {
  913.     goto L57100;
  914.     }
  915. /*                         !MIRROR N-S? */
  916.     rspeak_(735);
  917. /*                         !NO, WONT BUDGE. */
  918.     return ret_val;
  919.  
  920. L57100:
  921.     if (prsvec_1.prso != oindex_1.pindr) {
  922.     goto L57300;
  923.     }
  924. /*                         !PUSH PINE WALL? */
  925.     if (findex_1.mloc == rindex_1.mrc && findex_1.mdir == 180 || 
  926.         findex_1.mloc == rindex_1.mrd && findex_1.mdir == 0 || 
  927.         findex_1.mloc == rindex_1.mrg) {
  928.     goto L57200;
  929.     }
  930.     rspeak_(736);
  931. /*                         !NO, OPENS. */
  932.     findex_1.wdopnf = TRUE_;
  933. /*                         !INDICATE OPEN. */
  934.     cevent_1.cflag[cindex_1.cevpin - 1] = TRUE_;
  935. /*                         !TIME OPENING. */
  936.     cevent_1.ctick[cindex_1.cevpin - 1] = 5;
  937.     return ret_val;
  938.  
  939. L57200:
  940.     rspeak_(737);
  941. /*                         !GDN SEES YOU, DIE. */
  942.     jigsup_(685);
  943.     return ret_val;
  944.  
  945. L57300:
  946.     nloc = findex_1.mloc - 1;
  947. /*                         !NEW LOC IF SOUTH. */
  948.     if (findex_1.mdir == 0) {
  949.     nloc = findex_1.mloc + 1;
  950.     }
  951. /*                         !NEW LOC IF NORTH. */
  952.     if (nloc >= rindex_1.mra && nloc <= rindex_1.mrd) {
  953.     goto L57400;
  954.     }
  955.     rspeak_(738);
  956. /*                         !HAVE REACHED END. */
  957.     return ret_val;
  958.  
  959. L57400:
  960.     i = 699;
  961. /*                         !ASSUME SOUTH. */
  962.     if (findex_1.mdir == 0) {
  963.     i = 695;
  964.     }
  965. /*                         !NORTH. */
  966.     j = 739;
  967. /*                         !ASSUME SMOOTH. */
  968.     if (findex_1.poleuf != 0) {
  969.     j = 740;
  970.     }
  971. /*                         !POLE UP, WOBBLES. */
  972.     rspsub_(j, i);
  973. /*                         !DESCRIBE. */
  974.     findex_1.mloc = nloc;
  975.     if (findex_1.mloc != rindex_1.mrg) {
  976.     return ret_val;
  977.     }
  978. /*                         !NOW IN GDN ROOM? */
  979.  
  980.     if (findex_1.poleuf != 0) {
  981.     goto L57500;
  982.     }
  983. /*                         !POLE UP, GDN SEES. */
  984.     if (findex_1.mropnf || findex_1.wdopnf) {
  985.     goto L57600;
  986.     }
  987. /*                         !DOOR OPEN, GDN SEES. */
  988.     if (findex_1.mr1f && findex_1.mr2f) {
  989.     return ret_val;
  990.     }
  991. /*                         !MIRRORS INTACT, OK. */
  992.     rspeak_(742);
  993. /*                         !MIRRORS BROKEN, DIE. */
  994.     jigsup_(743);
  995.     return ret_val;
  996.  
  997. L57500:
  998.     rspeak_(741);
  999. /*                         !POLE UP, DIE. */
  1000.     jigsup_(743);
  1001.     return ret_val;
  1002.  
  1003. L57600:
  1004.     rspeak_(744);
  1005. /*                         !DOOR OPEN, DIE. */
  1006.     jigsup_(743);
  1007.     return ret_val;
  1008. /* OAPPLI, PAGE 11 */
  1009.  
  1010. /* O127--    GLOBAL GUARDIANS */
  1011.  
  1012. L58000:
  1013.     if (prsvec_1.prsa != vindex_1.attacw && prsvec_1.prsa != vindex_1.killw &&
  1014.          prsvec_1.prsa != vindex_1.mungw) {
  1015.     goto L58100;
  1016.     }
  1017.     jigsup_(745);
  1018. /*                         !LOSE. */
  1019.     return ret_val;
  1020.  
  1021. L58100:
  1022.     if (prsvec_1.prsa != vindex_1.hellow) {
  1023.     goto L10;
  1024.     }
  1025. /*                         !HELLO? */
  1026.     rspeak_(746);
  1027. /*                         !NO REPLY. */
  1028.     return ret_val;
  1029.  
  1030. /* O128--    GLOBAL MASTER */
  1031.  
  1032. L59000:
  1033.     if (prsvec_1.prsa != vindex_1.attacw && prsvec_1.prsa != vindex_1.killw &&
  1034.          prsvec_1.prsa != vindex_1.mungw) {
  1035.     goto L59100;
  1036.     }
  1037.     jigsup_(747);
  1038. /*                         !BAD IDEA. */
  1039.     return ret_val;
  1040.  
  1041. L59100:
  1042.     if (prsvec_1.prsa != vindex_1.takew) {
  1043.     goto L10;
  1044.     }
  1045. /*                         !TAKE? */
  1046.     rspeak_(748);
  1047. /*                         !JOKE. */
  1048.     return ret_val;
  1049.  
  1050. /* O129--    NUMERAL FIVE (FOR JOKE) */
  1051.  
  1052. L60000:
  1053.     if (prsvec_1.prsa != vindex_1.takew) {
  1054.     goto L10;
  1055.     }
  1056. /*                         !TAKE FIVE? */
  1057.     rspeak_(419);
  1058. /*                         !TIME PASSES. */
  1059.     for (i = 1; i <= 3; ++i) {
  1060. /*                         !WAIT A WHILE. */
  1061.     if (clockd_()) {
  1062.         return ret_val;
  1063.     }
  1064. /* L60100: */
  1065.     }
  1066.     return ret_val;
  1067.  
  1068. /* O130--    CRYPT FUNCTION */
  1069.  
  1070. L61000:
  1071.     if (! findex_1.endgmf) {
  1072.     goto L45000;
  1073.     }
  1074. /*                         !IF NOT EG, DIE. */
  1075.     if (prsvec_1.prsa != vindex_1.openw) {
  1076.     goto L61100;
  1077.     }
  1078. /*                         !OPEN? */
  1079.     i = 793;
  1080.     if ((objcts_1.oflag2[oindex_1.tomb - 1] & OPENBT) != 0) {
  1081.     i = 794;
  1082.     }
  1083.     rspeak_(i);
  1084.     objcts_1.oflag2[oindex_1.tomb - 1] |= OPENBT;
  1085.     return ret_val;
  1086.  
  1087. L61100:
  1088.     if (prsvec_1.prsa != vindex_1.closew) {
  1089.     goto L45000;
  1090.     }
  1091. /*                         !CLOSE? */
  1092.     i = 795;
  1093.     if ((objcts_1.oflag2[oindex_1.tomb - 1] & OPENBT) != 0) {
  1094.     i = 796;
  1095.     }
  1096.     rspeak_(i);
  1097.     objcts_1.oflag2[oindex_1.tomb - 1] &= ~ OPENBT;
  1098.     if (play_1.here == rindex_1.crypt) {
  1099.     cevent_1.ctick[cindex_1.cevste - 1] = 3;
  1100.     }
  1101. /*                         !IF IN CRYPT, START EG. */
  1102.     return ret_val;
  1103. /* OAPPLI, PAGE 12 */
  1104.  
  1105. /* O131--    GLOBAL LADDER */
  1106.  
  1107. L62000:
  1108.     if (puzzle_1.cpvec[findex_1.cphere] == -2 || puzzle_1.cpvec[
  1109.         findex_1.cphere - 2] == -3) {
  1110.     goto L62100;
  1111.     }
  1112.     rspeak_(865);
  1113. /*                         !NO, LOSE. */
  1114.     return ret_val;
  1115.  
  1116. L62100:
  1117.     if (prsvec_1.prsa == vindex_1.clmbw || prsvec_1.prsa == vindex_1.clmbuw) {
  1118.  
  1119.     goto L62200;
  1120.     }
  1121.     rspeak_(866);
  1122. /*                         !CLIMB IT? */
  1123.     return ret_val;
  1124.  
  1125. L62200:
  1126.     if (findex_1.cphere == 10 && puzzle_1.cpvec[findex_1.cphere] == -2) {
  1127.     goto L62300;
  1128.     }
  1129.     rspeak_(867);
  1130. /*                         !NO, HIT YOUR HEAD. */
  1131.     return ret_val;
  1132.  
  1133. L62300:
  1134.     f = moveto_(rindex_1.cpant, play_1.winner);
  1135. /*                         !TO ANTEROOM. */
  1136.     f = rmdesc_(3);
  1137. /*                         !DESCRIBE. */
  1138.     return ret_val;
  1139.  
  1140. } /* oappli_ */
  1141.